package xyz.rule;

import com.netflix.loadbalancer.IRule;
import com.netflix.loadbalancer.RandomRule;
import org.springframework.context.annotation.Bean;

/**
 * 自定义Ribbon规则类
 *
 * @author fping
 * @date 2020/11/7 14:08
 */
public class MyRibbonRule {

    @Bean
    public IRule myRule() {
        //定义为随机
        return new RandomRule();
    }
}
